package com.sunxd.vue.infrastructure.adapter.db.mapping;

import com.alibaba.fastjson.JSON;
import com.sunxd.vue.infrastructure.utils.StringUtil;
import org.mapstruct.Named;

/**
 * @author sun.xd
 * @description: description
 * @date 2024/4/25 11:59
 */
public interface BaseMapping {

    @Named(value = "obj2String")
    default String obj2String(Object object){
        return JSON.toJSONString(object);
    }

    @Named(value = "initUuid")
    default String initUuid(String uuid){
        return StringUtil.buildUUID();
    }

}
